<?php

namespace App\Library\Service;

use App\Exceptions\ApiException;
use App\Library\Logic\OrderLogic;
use App\Library\Requests\OrderPageRequest;
use Illuminate\Http\JsonResponse;

class OrderService extends BaseService
{
    public function __construct(OrderLogic $logic)
    {
        $this->logic = $logic;
    }

    /**
     * paging
     * @param OrderPageRequest $request
     * @return JsonResponse
     * @throws ApiException
     */
    public function paging(OrderPageRequest $request): JsonResponse
    {
        if ($request->status > PHP_INT_MAX) throw new ApiException(random());
        return success($request->all());
    }
}
